#include"athlete.h"
Athlete::Athlete() {}

Athlete::~Athlete()
{

}

void Athlete::getValue(int& id, QString& athleteName, QString& code, QString& medalDate, QString& medalLevel, QString& eventName, QString& score, QString& country_name)
{
    id = this->id;
    athleteName = this->athleteName;
    code = this->code;
    medalDate = this->medalDate;
    medalLevel = this->medalLevel;
    eventName = this->eventName;
    score = this->score;
    country_name = this->country_name;
}


void Athlete::setValue(int& id, QString& athleteName, QString& code, QString& medalDate, QString& medalLevel, QString& eventName, QString& score, QString& country_name)
{
    this->id = id;
    this->athleteName = athleteName;
    this->code = code;
    this->medalDate = medalDate;
    this->medalLevel = medalLevel;
    this->eventName = eventName;
    this->score = score;
    this->country_name = country_name;
}

void Athlete::read(QTextStream& aStream)
{
    aStream >> id;
    aStream >> athleteName;
    aStream >> code;
    aStream >> medalDate;
    aStream >> medalLevel;
    aStream >> eventName;
    aStream >> score;
    aStream >> country_name;
}

void Athlete::save(QTextStream& aStream)
{
    aStream << id << "\t";
    aStream << athleteName << "\t";
    aStream << code << "\t";
    aStream << medalDate << "\t";
    aStream << medalLevel << "\t";
    aStream << eventName << "\t";
    aStream << score << "\t";
    aStream << country_name << "\n";
}
